@extends('member.member')

@section('title', '修改资料')

@section('rightcontainer')
<link href="{{ asset('/addons/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css') }}" rel="stylesheet">
<link href="{{ asset('/addons/icheck-1.x/skins/flat/blue.css') }}" rel="stylesheet">
<script src="{{ asset('/addons/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js') }}" type="text/javascript"></script>
<script src="{{ asset('/addons/bootstrap-datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js') }}" type="text/javascript"></script>
<script src="{{ asset('/addons/icheck-1.x/icheck.min.js') }}" type="text/javascript"></script>
<div class="member-container fr">
    @if (count($errors) > 0)
		<div class="alert alert-danger mt-20">
			<ul>
				@foreach ($errors->all() as $error)
					<li>{{ $error }}</li>
				@endforeach
			</ul>
		</div>
	@endif
    <form action="{{url('/member/account')}}" method="post">
	<ul class="account-ul mt-75 clearfix">
		<li>
		   <div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">用户昵称<span style="color: red">*</span>：</div>
              <div class="col-sm-9 col-xs-12"> 
                <input type="text" name="username" class="form-control"  value="{{$userinfo->name}}" id="checkUname">
                <div class="help-block" id="error" style="text-align:left;color:red;"></div>
              </div>
		   </div>
		</li>
		<li>
			<div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">用户邮箱<span style="color: red">*</span>：</div>
              <div class="col-sm-9 col-xs-12">
                <input type="email" name="email" class="form-control" value="{{$userinfo->email}}" readonly>
              </div>
		   </div>
		</li>
		<li>
			<div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">性别：</div>
              <div class="col-sm-9 col-xs-12 text-left">
                <label><input type="radio" name="sex" value="1" @if($userinfo->sex == 1) checked @endif>&nbsp;&nbsp;男 </label>&nbsp;&nbsp;&nbsp;&nbsp;
                <label><input type="radio" name="sex" value="0" @if($userinfo->sex != 1) checked @endif>&nbsp;&nbsp;女</label>
              </div>
		   </div>
		</li>
		<li>
			<div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">手机号码<span style="color: red">*</span>：</div>
              <div class="col-sm-9 col-xs-12">
                <input type="number" name="phone" class="form-control" value="{{$userinfo->phone}}" readonly>
              </div>
		   </div>
		</li>
		<li>
			<div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">真实姓名：</div>
              <div class="col-sm-9 col-xs-12">
                <input type="text" name="real_name" class="form-control" value="{{$userinfo->real_name}}">
              </div>
		   </div>
		</li>
		<li>
			<div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">QQ号码：</div>
              <div class="col-sm-9 col-xs-12">
                <input type="number" name="qq" class="form-control" value="{{$userinfo->qq}}">
              </div>
		   </div>
		</li>
		<li>
			<div class="form-group clearfix">
		      <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">个性签名：</div>
              <div class="col-sm-9 col-xs-12">
                <input type="text" name="signature" class="form-control" value="{{$userinfo->signature}}">
              </div>
		   </div>
		</li>
		<li>
		    <div class="form-group clearfix">
                <div class="col-xs-12 col-sm-3 col-md-2 control-label ft-16 cor-2">出生年月</div>
                <div class="col-sm-4 col-xs-12">
                    <input size="16" type="text" class="form_datetime date form-control" readonly name="birth" value="@if(!empty($userinfo->birth_year)&&!empty($userinfo->birth_month)){{$userinfo->birth_year}}-{{$userinfo->birth_month}} @else {{date('Y-m')}} @endif" data-date-format="yyyy-mm"  readonly>
                </div>
            </div>
		</li>
		<li>
		  <div class="account-button clearfix">
		      {!! csrf_field() !!}
		      <input type="hidden" name="types" value="info">
    		  <button class="button-save fl">保存</button>
    		  <div class="button-cancel fl"><a href="#">取消</a></div>
		  </div>
	   </li>
	</ul>
	</form>
</div>
<script type="text/javascript">
<!--
$('input').iCheck({
	checkboxClass: 'icheckbox_flat-blue',
    radioClass: 'iradio_flat-blue',
    increaseArea: '-10' // optional
});
$('.form_datetime').datetimepicker({
    format:'yyyy-mm',
    language:  'zh-CN',
    weekStart: 1,
    todayBtn:  1,
    autoclose: 1,
    todayHighlight: 1,
    startView: 4,
    minView: 3,
    forceParse: 0
});
//-->
</script>
@stop

<!-- 底部块 -->
@section('footer')
    @parent
@stop

